#ifndef GUARD_SpriteSheet_h
#define GUARD_SpriteSheet_h

#include <vector>
#include <string>
#include "SDL_opengl.h"

struct TexCoords
{
	GLfloat s,t,unitS,unitT;
	
	TexCoords(GLfloat _s, GLfloat _t, GLfloat _unitS, GLfloat _unitT):
		s(_s),t(_t),unitS(_unitS),unitT(_unitT) {}
};

class SpriteSheet
{
private:
	std::vector<std::vector<TexCoords*> > coordinates;
	GLuint texture;

	const short tileHeight;
	const short tileWidth;
	
	const short tileMargin;
	
	short tileCols;
	short tileRows;
	short tilesetHeight;
	short tilesetWidth;
public:
	const short tileSpacing;
	GLuint getTextureInt();
	short getTileWidth();
	short getTileHeight();
	SpriteSheet(const std::string& fileName, short tileW, short tileH, short tileSpacing, short tileMargin);
	TexCoords* getTexCoords(int row, int col);
};


#endif